package com.iscas.tech.service;

import com.iscas.tech.entity.AtNewsattach;
import com.iscas.tech.param.AtNewsattachPageParam;
import com.iscas.tech.vo.AtNewsattachQueryVo;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.pagination.Paging;

/**
 * 新闻附件表 服务类
 *
 * @author yangyi
 * @since 2020-10-26
 */
public interface AtNewsattachService extends BaseService<AtNewsattach> {

    /**
     * 保存
     *
     * @param atNewsattach
     * @return
     * @throws Exception
     */
    boolean saveAtNewsattach(AtNewsattach atNewsattach) throws Exception;

    /**
     * 修改
     *
     * @param atNewsattach
     * @return
     * @throws Exception
     */
    boolean updateAtNewsattach(AtNewsattach atNewsattach) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteAtNewsattach(Long id) throws Exception;


    /**
     * 获取分页对象
     *
     * @param atNewsattachPageParam
     * @return
     * @throws Exception
     */
    Paging<AtNewsattachQueryVo> getAtNewsattachPageList(AtNewsattachPageParam atNewsattachPageParam) throws Exception;

    /**
     * 删除新闻下所有附件信息
     *
     * @param id 新闻主键ID
     * @return 删除结果
     */
    boolean deleteByNewsId(Integer id) throws Exception;
}
